
<h2>TodoList</h2>
<div class="todolist">
    <input type="text" [(ngModel)]="keyWords"  (keyup)="doAdd($event)" />
    <h1>待办事项</h1>

    <ul>
        <li *ngFor="let item of toDoList;let key=index" [hidden]="item.status==1">

            {{item.title}} <button (click)="toDo(key)">处理</button>
            
        </li>
    </ul>
    <h1>已完成事项</h1>

    <ul>
        <li *ngFor="let item of toDoList;let key=index" [hidden]="item.status==0">

            {{item.title}} <button (click)="deleteData(key)">删除</button>
            
        </li>
    </ul>
<hr>

</div>